In recent years, with the development of electronic devices, smartphones, tablet computers, MP3 players and the like gradually enter lives of people, and greatly enrich and facilitate the lives of the people. Some users like using an electronic device to listen to music during walking, bicycling, and/or driving, which can tremendously increases the risk of causing a traffic accident. Particularly, when a user wears an earphone to listen to music, if the volume of the music is large, it is prone to cause a risk because the user may ignore an external sound.
For the foregoing problem, some practices are as follows: an external sound is collected, the external sound and music are superposed, and then played to a user, and the user determines whether a risk exists. A disadvantage of this type of practices lies in that, the user is affected by an environmental noise while listening to the music, and thus user experience is not good.